import { http } from '../service';

// 获取表单内容
export function getformList(params: any) {
  return http.middleware({
    url: `/ctms/Rest/form/apply/list`,
    method: 'GET',
    params,
  });
}
// 获取文件清单数据
export function getfileDetailList(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectFileListItem/commonDetailList`,
    method: 'GET',
    params,
  });
}
// 获取总预算
export function getContractInfo(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectContract/getInfoById`,
    // url: `/ctms/Rest/projectContract/getById`,
    method: 'GET',
    params,
  });
}
// 预算费控列表查询
export function getBudgetControlList(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectContractBudgetControl/list`,
    method: 'GET',
    params,
  });
}

// 付款计划列表查询
export function getPaymentPlanList(params: any) {
  return http.request({
    url: `/ctms/Rest/projectContractPaymentPlan/list`,
    method: 'GET',
    params,
  });
}
// 根据业务ID获取当前审批权限、撤回
export function getSpecifyNodeHandleInfo(params: any) {
  return http.middleware({
    url: `/ctms/Rest/commonFinance/getWorkFlowHandleApprovalRevokeAuthorInfo/`,
    method: 'GET',
    params,
  });
}
// 工作流（审批、撤回、退回、拒绝）
export function workflowOperateProcess(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectContract/workflowOperateProcess`,
    method: 'POST',
    data: params,
  });
}
// 项目中心-付款登记-撤回
export function workflowOperateProcessPayment(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectPayment/registration/workflowOperateProcess`,
    method: 'POST',
    data: params,
  });
}
// 审批
export function workflowOperateProcessFundAdjust(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectFundAdjust/workflowOperateProcess`,
    method: 'POST',
    data: params,
  });
}

// 项目中心-经费支出-审批
export function workflowOperateProcessFundExpend(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectFundExpend/workflowOperateProcess`,
    method: 'POST',
    data: params,
  });
}
// 项目中心-付款登记-获取费用明细
export function getCostDetail(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectPayment/registration/getDetail`,
    method: 'GET',
    params,
  });
}
// 项目中心-付款登记-根据付款登记id获取金额
export function getAmountBypaymentRegistId(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectPayment/registration/getAmountBypaymentRegistId`,
    method: 'GET',
    params,
  });
}
// 项目中心-付款登记-付款登记信息详情
export function getPaymentRegister(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectPayment/registration/getPaymentRegister`,
    method: 'GET',
    params,
  });
}
// 项目中心-经费支出
export function getExcessAmount(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectFundExpend/getExcessAmount`,
    method: 'GET',
    params,
  });
}
// 项目中心-查询经费支出详情
export function getFundExpendInfo(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectFundExpend/detail`,
    method: 'GET',
    params,
  });
}
// 项目中心-查询项目基本信息-
export function getProjectInfo(params: any) {
  return http.middleware({
    url: `/ctms/Rest/project/getById`,
    method: 'GET',
    params,
  });
}
// 获取经费调整数据详情(查看)
export function getAdjustDetail(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectFundAdjust/getAdjustDetail`,
    method: 'GET',
    params,
  });
}
// 获取经费调整的基本信息
export function getAdjustInfo(params: any) {
  return http.middleware({
    url: `/ctms/Rest/projectFundAdjust/getAdjust`,
    method: 'GET',
    params,
  });
}
